package vip.xiaonuo.biz.modular.lancerRegister;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.UserRegisterDTO;
import vip.xiaonuo.common.pojo.CommonResult;

import javax.validation.Valid;


@Api(tags = "用户注册")
@ApiSupport(author = "LANCER_TEAM", order = 1)
@RestController
@RequestMapping(value = "/biz/login")
@Validated
public class UserRegisterController {
    @Autowired
    MyLoginService service;
    @ApiOperationSupport(order = 3)
    @ApiOperation("账号密码注册")
    @PostMapping("/doRegister")
    public CommonResult<String> doRegister(@RequestBody @Valid UserRegisterDTO dto) {
        service.doRegister(dto);
        return CommonResult.ok();
    }
}